home *** CD-ROM | disk | FTP | other *** search
- on addLists masterList, listToAdd
- if not listp(masterList) then
- if masterList <> EMPTY then
- exit
- end if
- set theDataType to getIlk(listToAdd)
- if theDataType = #linearList then
- set masterList to []
- else
- if theDataType = #propertyList then
- set masterList to [:]
- else
- exit
- end if
- end if
- end if
- if not listp(listToAdd) and (listToAdd <> EMPTY) then
- exit
- end if
- if getIlk(masterList) <> getIlk(listToAdd) then
- exit
- end if
- if getIlk(masterList) = #linearList then
- set newItemCount to count(listToAdd)
- repeat with x = 1 to newItemCount
- add(masterList, getAt(listToAdd, x))
- end repeat
- else
- set newItemCount to count(listToAdd)
- repeat with x = 1 to newItemCount
- addProp(masterList, getPropAt(listToAdd, x), getAt(listToAdd, x))
- end repeat
- end if
- end
-
- on getIlk data
- if listp(data) then
- if ilk(data, #propList) then
- set theIlk to #propList
- else
- set theIlk to #linearList
- end if
- else
- set theIlk to ilk(data)
- end if
- return theIlk
- end
-